﻿<Window x:Class="RegularExpressionTest.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        Title="RegularExpressionTest"
        Height="426" Width="400"
        Background="DarkCyan"
        SizeChanged="Window_SizeChanged_1"
        Name="window1" Icon="RE.ico"
        >
    <Window.Resources>
        <ContextMenu x:Key="contextMenu">
            <MenuItem x:Name="copyMenuItem" Header="Copy *" Click="copyMenuItem_Click_1" Visibility="Visible"/>
            <MenuItem x:Name="pasteMenuItem" Header="Paste *" Click="pasteMenuItem_Click_1" Visibility="Visible"/>
            <MenuItem x:Name="copyAll" Header="Copy All" Click="copyAll_Click_1" Visibility="Visible"/>
            <MenuItem x:Name="copyTemplate" Header="Copy Code Snippet" Click="copyTemplate_Click_1" Visibility="Visible"/>
            <MenuItem x:Name="rmEscMenuItem" Header="\&quot; ⇒ &quot;" Click="rmEscMenuItem_Click_1" Visibility="Visible"/>
            <MenuItem x:Name="addEscMenuItem" Header="&quot; ⇒ \&quot;" Click="addEscMenuItem_Click_1" Visibility="Visible"/>
        </ContextMenu>
        
        <sys:String x:Key="mouseWheel">Control + Mouse Wheel changes FontSize</sys:String>

    </Window.Resources>
    <Grid x:Name="grid1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ContextMenu="{StaticResource contextMenu}" ContextMenuOpening="Grid_ContextMenuOpening_1">
        <Grid.RowDefinitions>
            <RowDefinition Height="100" />
            <RowDefinition Height="100" />
            <RowDefinition Height="40" />
            <RowDefinition Height="50" />
            <RowDefinition x:Name="rowListBox" Height="100"/>
        </Grid.RowDefinitions>

        <TextBox Grid.Row="0" Name="textBoxPattern" Margin="2" Background="LightGoldenrodYellow" ContextMenu="{StaticResource contextMenu}" KeyUp="textBoxPattern_KeyUp" DragEnter="textBoxPattern_DragEnter" DragLeave="textBoxPattern_DragLeave" DragOver="textBoxPattern_DragOver" Drop="textBoxPattern_Drop">
            <TextBox.ToolTip>
                <StackPanel>
                    <TextBlock FontSize="16">Pattern</TextBlock>
                    <TextBlock FontSize="14" Text="{StaticResource mouseWheel}"/>
                </StackPanel>
            </TextBox.ToolTip>
        </TextBox>
        <TextBox Grid.Row="1" Name="textBoxInput" Margin="2" Background="LightCyan" ContextMenu="{StaticResource contextMenu}" KeyUp="textBoxInput_KeyUp" DragEnter="textBoxInput_DragEnter" DragLeave="textBoxInput_DragLeave" DragOver="textBoxInput_DragOver" Drop="textBoxInput_Drop">
            <TextBox.ToolTip>
                <StackPanel>
                    <TextBlock FontSize="16">Text</TextBlock>
                    <TextBlock FontSize="14" Text="{StaticResource mouseWheel}"/>
                </StackPanel>
            </TextBox.ToolTip>
        </TextBox>
        <Button Grid.Row="2" Name="buttonMatch" Content="Match!" Margin="35,5,35,5"  Click="buttonMatch_Click" ContextMenu="{StaticResource contextMenu}"/>
        <Label Grid.Row="3" Name="textBoxCount" IsEnabled="False" Margin="2"  Background="DimGray" ContextMenu="{StaticResource contextMenu}"/>
        <StackPanel Grid.Row="4"  HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="MintCream" ContextMenu="{StaticResource contextMenu}" >
            <ListBox Name="listBoxGroups"  HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="MintCream" ContextMenu="{StaticResource contextMenu}" MouseMove="listBoxGroups_MouseMove" MouseLeave="listBoxGroups_MouseLeave"/>
            <StackPanel.ToolTip>
                <TextBlock FontSize="14" Text="{StaticResource mouseWheel}"/>
            </StackPanel.ToolTip>
        </StackPanel>
    </Grid>
</Window>
